﻿<?php
$server ='192.168.1.10';  //服务器IP地址,如果是本地，可以写成localhost
$username ='sa2';  //用户名
$password ='sasa'; //密码
$database ='GT';  //数据库名称
//连接数据库
$connstr = "Driver={SQL Server};Server=$server;Database=$database";     
if ( !odbc_connect($connstr,$username,$password,SQL_CUR_USE_ODBC)){     
  echo "Couldn't connect to SQL Server on $server";     
  }else{     
  echo "";   
  }

//查询数据库表AX_Order_Column_Display 
$sqlconnection = odbc_connect($connstr,$username,$password,SQL_CUR_USE_ODBC);
$hid = !empty($_GET['hid'])?intval($_GET['hid']):0; 
$sql="SELECT * FROM Ax_replace_order";
   if (!$sqlconnection)
     {exit("Connection Failed: " . $sqlconnection);}

   $rs=odbc_exec($sqlconnection, $sql);

   while ($row=odbc_fetch_array($rs))
   {   
   
}
 odbc_close($sqlconnection);
?>
